package com.arong.swing.exception;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

/**
 * 
 * Title: -Data Application Products <br>
 * Description:运用异常类 <br>
 * Date: 2012-3-5 <br>
 * Copyright (c) 2015  anrong  <br>
 * @author hsy
 */

public class AppException extends Exception {
    private static final long serialVersionUID = 1L;

    public String getErrId() {
		return this.errId;
	}

	public void setErrId(String errId) {
		this.errId = errId;
	}

	public String getErrMsg() {
		return this.errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

	public AppException() {

    }
    
    /**
     * 错误号
     */

    String errId;

    /**
     * 错误信息，当前错误的信息。
     */
    String errMsg;

    public AppException(String errId, String errOwnMsg) {
        this.errId = errId;
        this.errMsg = errOwnMsg;
        this.writeAppException();
    }
    private void writeAppException() {
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        PrintStream p = new PrintStream(os);
        this.printStackTrace(p);
    }
}
